const path = require('path');

module.exports = {
    target: "node",
    entry: path.resolve(__dirname, 'index.js'),
    output: {
        filename: 'server.js',
        path: path.resolve(__dirname, './dist'),
        publicPath: '',
        libraryTarget: 'commonjs2'
    },
    module: {
        rules: [
            {
                test: /(\.jsx|js)$/,
                exclude: /node_modules/,
                use: [
                    {
                        loader: 'babel-loader'
                    }
                ]
            }
        ]
    }
};